package com.it.you.base.string;

import org.apache.commons.lang3.StringUtils;

public class StringTest3 {
    public static void main(String[] args) {
        String a = "";
        String b = "  ";
        String c = null;
        System.out.println(StringUtils.isBlank(a));//true
        System.out.println(StringUtils.isBlank(b));//true
        System.out.println(StringUtils.isBlank(c));//true

        System.out.println(StringUtils.isEmpty(a));//true
        System.out.println(StringUtils.isEmpty(b));//false 不能判断空格字符串
        System.out.println(StringUtils.isEmpty(c));//true

        String remake = "ZP";
        System.out.println(remake.trim().toUpperCase());
        String remake2 = "zp";
        System.out.println(remake2.trim().toUpperCase());
        String sellNote = "    控销；贵州益佰物流赠品编码     ";
        String s = sellNote.trim().toUpperCase();
        if (s.contains("ZP") || s.contains("赠品")) {
            System.out.println("baohan");
        }
    }
}
